package test;

import java.util.Scanner;

class Day5Homework1 {
	public static void main(String[] args) {
		System.out.println("请输入两个数字:");
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		Scanner scanner = new Scanner(System.in);
		double c = scanner.nextDouble();
		double d = scanner.nextDouble();

		System.out.println(add(a, b));
		System.out.println(add(c, d));

	}
//(1)键盘录入两个数据,求两个数据之和(整数和小数)

	public static double add(double a, double b) {
		return a + b;

	}

	public static int add(int a, int b) {
		return a + b;

	}

	//(2)键盘录入两个数据,判断两个数据是否相等(整数和小数)
	public static boolean equal(double a, double b) {
		return a == b;
	}

	public static boolean equal(int a, int b) {
		return a == b;
	}

	//(3)键盘录入三个数据,获取两个数中较大的值(整数和小数)
	public static int max(int a, int b, int c) {
		return a > b ? a : b > c ? a > b ? a : b : c;
	}

	public static double max(double a, double b, double c) {
		return a > b ? a : b > c ? a > b ? a : b : c;
	}

	//(4)打印m行n列的星形矩形
	public static void printXing(int a, int b) {
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				System.out.print("*");
			}
			System.out.println();
		}
	}

	//(5)打印nn乘法表
	public static void printCheng(int a, int b) {
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < b; j++) {
				System.out.print(b * a + "=" + b * a);
			}
			System.out.println();
		}
	}
}
